
********************************************************************************
*
* GRIST TO THE MILL OF SUBVERSION:
* STRIKES AND COUPS IN COUNTERINSURGENCIES
*
* By Christian Glaessel, Belén González, Adam Scharpf
*
* European Journal of International Relations
*
* April 2020
*
********************************************************************************
*
* Content:	Replication of results in manuscript and supporting information	
*
*			Steps:
*			1) Set working directory
*			2) Run do-file to replicate results in tables of manuscript and supporting information
*
********************************************************************************
*
* Packages: Before running this code, please make sure you have the following
*			.ado-files installed
*
*			- Clarify Package, Version 2.1:
*					net from https://gking.harvard.edu/clarify 
*					net install clarify 
*			- CEM Package, Version 10.1: 
*					ssc install cem
*			- Parmest Package, Version 2
*					net install st0043_2.pkg
*
********************************************************************************

	version 15.1
	set more off

	clear all
  
 
 
********************************************************************************
*
* Setting working directory in macro
*
********************************************************************************

	*Insert path to folder containing dataset "StrikesCoups_analysis.dta" before running
	global path="..." //Example: "C:\Users\me\Desktop\Glaesseletal_StrikesCoups"
	
 
 
********************************************************************************
*
* Producing log-file of results
*
********************************************************************************

	*Starting log file
	log using "$path\Glaesseletal_StrikesCoups_EJIR_tables", replace 

	
	
********************************************************************************
*
* Loading replication dataset
*
********************************************************************************

	*Loading replication dataset
	use "$path\StrikesCoups_analysis.dta"



********************************************************************************
*
* Empirical results
*
********************************************************************************

	****************************************************************************
	*Table 1. Types of resistance and coup risk in counterinsurgencies, 1950-2005
	****************************************************************************
	
	*Model 1
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d  banks_demos_d
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr
	
	
	*Model 2 
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d banks_demos_d
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr	
	
	
	*Model 3
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr

	
	*Model 4
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr

	
	*Model 5
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr

	
	*Model 6
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr
		
			
	
********************************************************************************
*
* Results in Supporting Information
*
********************************************************************************


********************************************************************************
*SI: Descriptive statistics
********************************************************************************

	****************************************************************************
	*Table SI.1. Summary statistics for main analysis
	****************************************************************************

	#delimit ;
		sum 
		coup
		banks_strikes_d banks_demos_d
		banks_guerilla_d banks_riots_d
		banks_strikes banks_demos banks_guerilla banks_riots
		lnbanks_strikes lnbanks_demos lnbanks_guerilla lnbanks_riots
		changergdp
		logtroopqual
		logrepcap	
		cheibub_democracy		
		cheibub_civdict 
		cheibub_mildict
		cheibub_royaldict
		gwf_democracy
		gwf_personal	
		gwf_party 	
		gwf_military 	
		gwf_monarchy
		ldis
		multcoins
		occup
		coldwar
		wardur wardur2	
		own_middleeast own_asia own_africa own_americas
		time time2 time3
		if coin==1;
	#delimit cr
	
	
	
	****************************************************************************
	*Table SI.2. Summary statistics for conditional and selection effects
	****************************************************************************

	#delimit ;
		sum 
		coup
		banks_strikes_d banks_demos_d
		banks_guerilla_d banks_riots_d
		banks_strikes banks_demos banks_guerilla banks_riots
		lnbanks_strikes lnbanks_demos lnbanks_guerilla lnbanks_riots
		coin
		logrgdppc
		changergdp
		logpop
		logtroopqual	
		cheibub_democracy
		lmtnest
		maxlowx
		lnoilavg
		ncontig		
		ldis
		multcoins
		occup
		own_middleeast 
		own_asia 
		own_africa 
		own_americas
		time 
		time2 
		time3	
		ins_time
		ins_time2
		ins_time3		
		;
	#delimit cr	
		
	
	
********************************************************************************
*SI: Robustness checks: Additional control variables
********************************************************************************	
	
	****************************************************************************
	*Table SI.3. Effects of resistance types on coup risk controlling for 
	*repressive capacity
	****************************************************************************
		
	*Model 1
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d  banks_demos_d
			time time2 time3
			changergdp
			logrepcap
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr
	
	
	*Model 2
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d banks_demos_d
			time time2 time3
			changergdp		
			logrepcap
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr

	
	*Model 3
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logrepcap
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr

	
	*Model 4
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logrepcap
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr

	
	*Model 5
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp
			logrepcap
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr

	
	*Model 6
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp		
			logrepcap
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr	
	
	
	
	****************************************************************************
	*Table SI.4. Effects of resistance types on coup risk controlling for regime 
	*types from Cheibub et al. (2010) (Reference category: royal dictatorships)
	****************************************************************************		
		
	*Model 1
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d  banks_demos_d
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy		
			cheibub_civdict 
			cheibub_mildict
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 2
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d banks_demos_d
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy		
			cheibub_civdict 
			cheibub_mildict
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 3
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy		
			cheibub_civdict 
			cheibub_mildict
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr
	

	*Model 4 
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy		
			cheibub_civdict 
			cheibub_mildict
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 5
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy		
			cheibub_civdict 
			cheibub_mildict
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 6
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy		
			cheibub_civdict 
			cheibub_mildict
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr
		
	
	
	****************************************************************************
	*Table SI.5. Effects of resistance types on coup risk controlling for regime
	*types from Geddes et al. (2014) (Reference category: transitional/provisional regimes)
	****************************************************************************	
	
	*Model 1
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d  banks_demos_d
			time time2 time3
			changergdp
			logtroopqual
			gwf_military 
			gwf_party 
			gwf_personal 
			gwf_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 2 
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d banks_demos_d
			time time2 time3
			changergdp		
			logtroopqual
			gwf_military 
			gwf_party 
			gwf_personal 
			gwf_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 3
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			gwf_military 
			gwf_party 
			gwf_personal 
			gwf_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 4 
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			gwf_military 
			gwf_party 
			gwf_personal 
			gwf_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 5
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp
			logtroopqual
			gwf_military 
			gwf_party 
			gwf_personal 
			gwf_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 6
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp		
			logtroopqual
			gwf_military 
			gwf_party 
			gwf_personal 
			gwf_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr
	
	
	
	****************************************************************************
	*Table SI.6. Effects of resistance types on coup risk controlling for cold war
	****************************************************************************	
	
	*Model 1
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d  banks_demos_d
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			coldwar
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 2 
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d banks_demos_d
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			coldwar
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 3
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			coldwar
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 4
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			coldwar
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 5
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			coldwar
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 6
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			coldwar
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr	
		
	
	
	****************************************************************************
	*Table SI.7. Effects of resistance types on coup risk controlling for 
	*counterinsurgency duration
	****************************************************************************	
	
	*Model 1
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d  banks_demos_d
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			wardur wardur2
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 2 
	#delimit ;
	logit 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d banks_demos_d
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			wardur wardur2
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 3
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			wardur wardur2
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr

	

	*Model 4 
	#delimit ;
	logit 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			wardur wardur2
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 5
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			wardur wardur2
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr


	*Model 6 
	#delimit ;
	logit 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			wardur wardur2
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			cluster(gwno)
	;
	# delimit cr
	
	
	
********************************************************************************
*SI: Robustness checks: Model choice
********************************************************************************		
	
	****************************************************************************
	*Table SI.8. Effects of resistance types on coup risk with linear probability 
	*models and Prais-Winston transformation
	****************************************************************************		
	
	*Model 1
	#delimit ;
	prais 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d  banks_demos_d
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			robust
			rhotype(dw)
	;
	# delimit cr


	*Model 2 
	#delimit ;
	prais 	coup
			banks_guerilla_d banks_riots_d 
			banks_strikes_d banks_demos_d
			changergdp		
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			robust
			rhotype(dw)
	;
	# delimit cr


	*Model 3
	#delimit ;
	prais 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			robust
			rhotype(dw)
	;
	# delimit cr


	*Model 4 
	#delimit ;
	prais 	coup
			banks_guerilla banks_riots 
			banks_strikes banks_demos
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			robust
			rhotype(dw)
	;
	# delimit cr


	*Model 5
	#delimit ;
	prais 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			changergdp
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			if coin == 1, 
			robust
			rhotype(dw)
	;
	# delimit cr


	*Model 6 
	#delimit ;
	prais 	coup
			lnbanks_guerilla lnbanks_riots
			lnbanks_strikes lnbanks_demos
			changergdp		
			logtroopqual
			cheibub_democracy
			ldis
			multcoins
			occup
			own_middleeast own_asia own_africa own_americas
			if coin == 1, 
			robust
			rhotype(dw)
	;
	# delimit cr

	
	
********************************************************************************
*SI: Robustness checks: Interaction effects
********************************************************************************	
	
	****************************************************************************
	*Table SI.9. Conditional effects of resistance types on coup risk within and 
	*outside insurgencies
	****************************************************************************
		
	*Model 1
	#delimit ;
	logit 	coup
			d_coin_strike
			d_coin_demons
			d_coin_guerr
			d_coin_riot
			banks_strikes_d  
			banks_demos_d		
			banks_guerilla_d 
			banks_riots_d 
			coin
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy			
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 2
	#delimit ;
	logit 	coup
			d_coin_strike
			d_coin_demons
			d_coin_guerr
			d_coin_riot
			banks_strikes_d  
			banks_demos_d		
			banks_guerilla_d 
			banks_riots_d 
			coin
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy
			own_middleeast own_asia own_africa own_americas
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 3
	#delimit ;
	logit 	coup
			c_coin_strike
			c_coin_demons
			c_coin_guerr
			c_coin_riot
			banks_strikes 
			banks_demos
			banks_guerilla 
			banks_riots
			coin
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy	
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 4
	#delimit ;
	logit 	coup
			c_coin_strike
			c_coin_demons
			c_coin_guerr
			c_coin_riot
			banks_strikes 
			banks_demos
			banks_guerilla 
			banks_riots
			coin
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy	
			own_middleeast own_asia own_africa own_americas
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 5
	#delimit ;
	logit 	coup
			lnc_coin_strike
			lnc_coin_demons
			lnc_coin_guerr
			lnc_coin_riot
			lnbanks_strikes 
			lnbanks_demos
			lnbanks_guerilla 
			lnbanks_riots
			coin
			time time2 time3
			changergdp
			logtroopqual
			cheibub_democracy	
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 6
	#delimit ;
	logit 	coup
			lnc_coin_strike
			lnc_coin_demons
			lnc_coin_guerr
			lnc_coin_riot
			lnbanks_strikes 
			lnbanks_demos
			lnbanks_guerilla 
			lnbanks_riots
			coin
			time time2 time3
			changergdp		
			logtroopqual
			cheibub_democracy	
			own_middleeast own_asia own_africa own_americas
			, 
			cluster(gwno)
	;
	# delimit cr
	
	
	
	****************************************************************************
	*Table SI.10. Conditional effects of resistance types on coup risk within and 
	*outside insurgencies, controlling for level of development
	****************************************************************************	

	*Model 1
	#delimit ;
	logit 	coup
			d_coin_strike
			d_coin_demons
			d_coin_guerr
			d_coin_riot
			banks_strikes_d  
			banks_demos_d		
			banks_guerilla_d 
			banks_riots_d 
			coin
			time time2 time3
			logrgdppc
			changergdp
			logtroopqual
			cheibub_democracy			
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 2
	#delimit ;
	logit 	coup
			d_coin_strike
			d_coin_demons
			d_coin_guerr
			d_coin_riot
			banks_strikes_d  
			banks_demos_d		
			banks_guerilla_d 
			banks_riots_d 
			coin
			time time2 time3
			logrgdppc
			changergdp		
			logtroopqual
			cheibub_democracy
			own_middleeast own_asia own_africa own_americas
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 3
	#delimit ;
	logit 	coup
			c_coin_strike
			c_coin_demons
			c_coin_guerr
			c_coin_riot
			banks_strikes 
			banks_demos
			banks_guerilla 
			banks_riots
			coin
			time time2 time3
			logrgdppc
			changergdp
			logtroopqual
			cheibub_democracy	
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 4 
	#delimit ;
	logit 	coup
			c_coin_strike
			c_coin_demons
			c_coin_guerr
			c_coin_riot
			banks_strikes 
			banks_demos
			banks_guerilla 
			banks_riots
			coin
			time time2 time3
			logrgdppc
			changergdp
			logtroopqual
			cheibub_democracy	
			own_middleeast own_asia own_africa own_americas
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 5
	#delimit ;
	logit 	coup
			lnc_coin_strike
			lnc_coin_demons
			lnc_coin_guerr
			lnc_coin_riot
			lnbanks_strikes 
			lnbanks_demos
			lnbanks_guerilla 
			lnbanks_riots
			coin
			time time2 time3
			logrgdppc
			changergdp
			logtroopqual
			cheibub_democracy	
			, 
			cluster(gwno)
	;
	# delimit cr


	*Model 6 
	#delimit ;
	logit 	coup
			lnc_coin_strike
			lnc_coin_demons
			lnc_coin_guerr
			lnc_coin_riot
			lnbanks_strikes 
			lnbanks_demos
			lnbanks_guerilla 
			lnbanks_riots
			coin
			time time2 time3
			logrgdppc
			changergdp	
			logtroopqual
			cheibub_democracy	
			own_middleeast own_asia own_africa own_americas
			, 
			cluster(gwno)
	;
	# delimit cr
	
	
	
********************************************************************************
*SI: Robustness checks: Selection effects
********************************************************************************	
	
	****************************************************************************
	*Table SI.11. Effects of resistance types on onset of insurgencies and on 
	*coup risk during insurgencies using probit models with Heckman sample selection
	****************************************************************************		
		
	*Model 1
	#delimit ;
	heckprobit 	coup
				banks_strikes_d  
				banks_demos_d
				banks_guerilla_d 
				banks_riots_d 			
				time time2 time3
				changergdp
				logtroopqual
				cheibub_democracy
				ldis
				multcoins
				occup			
				, 
				select(
				coin =
				banks_strikes_d  
				banks_demos_d
				banks_guerilla_d 
				banks_riots_d 	
				logpop
				logrgdppc
				cheibub_democracy
				lmtnest
				maxlowx
				lnoilavg
				ncontig
				ins_time
				ins_time2
				ins_time3
				)
				cluster(gwno)
	;
	# delimit cr	


	*Model 2 
	#delimit ;
	heckprobit 	coup
				banks_strikes_d  
				banks_demos_d
				banks_guerilla_d 
				banks_riots_d 	
				time time2 time3
				changergdp
				logtroopqual
				cheibub_democracy
				ldis
				multcoins
				occup			
				own_middleeast own_asia own_africa own_americas			
				, 
				select(
				coin =
				banks_strikes_d  
				banks_demos_d
				banks_guerilla_d 
				banks_riots_d 	
				logpop
				logrgdppc
				cheibub_democracy
				lmtnest
				maxlowx
				lnoilavg
				ncontig	
				ins_time
				ins_time2
				ins_time3			
				own_middleeast own_asia own_africa own_americas	
				)
				cluster(gwno)
	;
	# delimit cr


	*Model 3
	#delimit ;
	heckprobit 	coup
				banks_strikes 
				banks_demos
				banks_guerilla 
				banks_riots			
				time time2 time3
				changergdp
				logtroopqual
				cheibub_democracy
				ldis
				multcoins
				occup			
				, 
				select(
				coin =
				banks_strikes 
				banks_demos
				banks_guerilla 
				banks_riots	
				logpop
				logrgdppc
				cheibub_democracy
				lmtnest
				maxlowx
				lnoilavg
				ncontig	
				ins_time
				ins_time2
				ins_time3				
				)
				cluster(gwno)
	;
	# delimit cr

	
	*Model 4 
	#delimit ;
	heckprobit 	coup
				banks_strikes 
				banks_demos
				banks_guerilla 
				banks_riots			
				time time2 time3
				changergdp
				logtroopqual
				cheibub_democracy
				ldis
				multcoins
				occup			
				own_middleeast own_asia own_africa own_americas					
				, 
				select(
				coin =
				banks_strikes 
				banks_demos
				banks_guerilla 
				banks_riots
				logpop
				logrgdppc
				cheibub_democracy
				lmtnest
				maxlowx
				lnoilavg
				ncontig
				ins_time
				ins_time2
				ins_time3				
				own_middleeast own_asia own_africa own_americas					
				)
				cluster(gwno)
	;
	# delimit cr


	*Model 5
	#delimit ;
	heckprobit 	coup
				lnbanks_strikes 
				lnbanks_demos
				lnbanks_guerilla 
				lnbanks_riots			
				time time2 time3
				changergdp
				logtroopqual
				cheibub_democracy
				ldis
				multcoins
				occup			
				, 
				select(
				coin =
				lnbanks_strikes 
				lnbanks_demos
				lnbanks_guerilla 
				lnbanks_riots
				logpop
				logrgdppc
				cheibub_democracy
				lmtnest
				maxlowx
				lnoilavg
				ncontig	
				ins_time
				ins_time2
				ins_time3				
				)
				cluster(gwno)
	;
	# delimit cr

	
	*Model 6 
	#delimit ;
	heckprobit 	coup
				lnbanks_strikes 
				lnbanks_demos
				lnbanks_guerilla 
				lnbanks_riots			
				time time2 time3
				changergdp
				logtroopqual
				cheibub_democracy
				ldis
				multcoins
				occup				
				own_middleeast own_asia own_africa own_americas	
				, 
				select(
				coin =
				lnbanks_strikes 
				lnbanks_demos
				lnbanks_guerilla 
				lnbanks_riots
				logpop
				logrgdppc
				cheibub_democracy
				lmtnest
				maxlowx
				lnoilavg
				ncontig	
				ins_time
				ins_time2
				ins_time3				
				own_middleeast own_asia own_africa own_americas	
				)
				cluster(gwno)
	;
	# delimit cr	
	
	
	
********************************************************************************	
*	
********************************************************************************		
	
	*Closing graph windows
	graph close _all 
	
	*Clearing data
	clear all
	
	*End recording log file
	log close	
